/*
===============================================================================
 Name        : main.c
 Author      : banfield
 Version     : 1
 Copyright   : Copyright (C)
 Description : main definition
===============================================================================
*/
#ifdef __USE_CMSIS
#include "lm3s_cmsis.h"
#endif

#include "inc/lm3s2965.h"
#include "Initialization.h"
#include "MotorControl.h"

#ifdef DEBUG
void
__error__(char *pcFilename, unsigned long ulLine)
{
}
#endif

int main(void) {
	// Initialization of IO ports
	InitMotors();

	SetMotor(0b100);

	while(1) {
		int i = 0;

		//Step();

		/*
		MoveToCoord(0, 0, 10);
		for(; i < 1000000; i++);

		MoveToCoord(0, 0, 0);
		for(; i > 0; i--);
		*/

		int direction = CLKWISE;
		SetDirection(&direction);
		for( ; i < 250 ; i++){
			Step();
		}

		direction = CNTR_CLKWISE;
		SetDirection(&direction);
		for( ; i > 0 ; i--){
			Step();
		}

	}
	return 0 ;
}

